<template>
	<view>
		<swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
			<swiper-item v-for="item in banner" :key="goods_id">
				<image :src="item.image_src" mode="" style="width: 100%;"></image>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		name:"swiper",
		data() {
			return {
				banner:[]
			};
		},
		created() {
			this.getBanner()
		},
		methods:{
			async getBanner(){
				let {data:res} = await uni.$http.get('/api/public/v1/home/swiperdata')
				console.log(res,'banner')
				this.banner = res.message
			}
		}
	}
</script>

<style lang="scss">

</style>
